<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<link href="<c:url value='/admin/css/custom.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/admin/css/style.css'/>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.7.2.min.js'/>"></script>
<style type="text/css">
<!--
body {
	background: #ffffff;
	margin-top:10px;
	margin-left:5px;
	margin-right:5px;
}
-->
</style>
<script type="text/javascript">

</script>
<body>
<div class="EpmsInall">
<div class="EpmsSubTitle"><p><b>拨出比率</b></p></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="EpmsTable">
  <tr>
	  <td class=EpmsTdTitle>时间</td>
	  <td class=EpmsTdTitle>直推奖</td>
	  <td class=EpmsTdTitle>对碰奖</td>
	  <td class=EpmsTdTitle>见点奖</td>
	  <td class=EpmsTdTitle>领导奖</td>
	  <td class=EpmsTdTitle>重消</td>
	  <td class=EpmsTdTitle>爱心基金</td>
	  <td class=EpmsTdTitle>总拨出</td>
	  <td class=EpmsTdTitle>总收入</td>
	  <td class=EpmsTdTitle>拨出比率</td>
  </tr>
	<c:forEach var="account" items="${accountRateList}" varStatus="status">
		<tr>
		    <td class=EpmsTdNoColor >
		    	${account[0]}
		    </td>
			<td class=EpmsTdNoColor >${account[1]}</td>
		    <td class=EpmsTdNoColor >${account[2]}</td>
			<td class=EpmsTdNoColor >${account[3]}</td>
		    <td class=EpmsTdNoColor >${account[4]}</td>
			<td class=EpmsTdNoColor >${account[5]}</td>
			<td class=EpmsTdNoColor >${account[6]}</td>
			<td class=EpmsTdNoColor>
				${account[1]+account[2]+account[3]+account[4]+account[5]+account[6]}
			</td>
			<td class=EpmsTdNoColor>${account[7]}</td>
		    <td class=EpmsTdNoColor>
		    <fmt:parseNumber value="${account[1]+account[2]+account[3]+account[4]+account[5]+account[6]}" var="a" />
		    <fmt:parseNumber value="${account[7]}" var="b" />
		    	${(a/b)*100}%
		    </td>
		</tr>
	</c:forEach>
	<tr>
		<td class="EpmsTdNoColor" colspan="10" align="right">
		第${pageNo}页&nbsp;
		<c:choose>
		<c:when test="${pageNo >1}">
			<a href="javascript:void(0);" style="text-decoration: none;">
				<span onclick="frontpage(1)">首页</span>
			</a>&nbsp;
			<a href="javascript:void(0);" style="text-decoration: none;">
				<span onclick="frontpage(${pageNo-1})">上一页</span>
			</a>&nbsp;
		</c:when>
		<c:otherwise>
			首页&nbsp;上一页 &nbsp;
		</c:otherwise>
		</c:choose>
		<c:choose>
			<c:when test="${totalPage > pageNo}">	
				<a href="javascript:void(0);" style="text-decoration: none;">
					<span onclick="nextpage(${pageNo+1})">下一页</span> 
				</a>&nbsp;
				<a href="javascript:void(0);" style="text-decoration: none;">
					<span onclick="nextpage(${totalPage})">末页</span> 
				</a>&nbsp;
			</c:when>
			<c:otherwise>
				下一页&nbsp;末页&nbsp;
			</c:otherwise>
		</c:choose>
		共${totalPage }页&nbsp;&nbsp;跳到第<select id="choicpage" style=" width: 5%">
			<c:forEach begin="1" end="${totalPage}" varStatus="status">
				<option value="${status.count}" <c:if test="${status.count eq pageNo}">selected</c:if>>${status.count}</option>
			</c:forEach>
		</select>页
		</td>
	</tr>
</table>
</div>
</body>
<script type="text/javascript">
function frontpage(pageNo){
	location = "${ctx}/admin/accountrate.action?pageNo="+pageNo;
}

function nextpage(pageNo){
	location = "${ctx}/admin/accountrate.action?pageNo="+pageNo;
}
$(function(){
	$("#choicpage").change(function(){
	  	 var pageNo = $("#choicpage").val();
	  	location = "${ctx}/admin/accountrate.action?pageNo="+pageNo;
	   });
});
	
</script>